<!-- 空白页面参考模版 -->
{extend name='public/base' /}
{block name='content'}
{include file='public/content_header' /}
<section class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-header dataSearch">
                        <form class="searchForm form-inline" id="searchForm" action="{:url('index')}" method="get">
                            <div class="input-group input-group-sm searchGroup">
                                <input value="{$_keywords|default=''}" name="_keywords" id="_keywords"
                                    class="form-control input-sm" placeholder="操作/URL">
                            </div>


                            <script>
                                $(function () {
                                    $('#admin_user_id').select2({
                                        width: '100%'
                                    });
                                });
                            </script>

                            <div class="input-group input-group-sm searchGroup" id="test6">
                                <input type="text" autocomplete="off" id="test-startDate-1" name="start_time"
                                    value="{$start_time|default=''}" class="form-control input-sm" placeholder="开始日期"> -
                                <input type="text" autocomplete="off" id="test-endDate-1" class="form-control input-sm"
                                    name="end_time" value="{$end_time|default=''}" placeholder="结束日期">
                            </div>


                            <script>
                                //日期范围
                                laydate.render({
                                    elem: '#test6'
                                    //设置开始日期、日期日期的 input 选择器
                                    //数组格式为 2.6.6 开始新增，之前版本直接配置 true 或任意分割字符即可
                                    , range: ['#test-startDate-1', '#test-endDate-1']
                                });
                            </script>

                            <div class="input-group input-group-sm searchGroup">
                                <button class="btn btn-sm btn-primary" type="submit"><i class="fa fa-search"></i>
                                    查询
                                </button>
                            </div>

                            <div class="form-group searchGroup">
                                <button onclick="clearSearchForm()" class="btn btn-sm btn-default" type="button"><i
                                        class="fa  fa-eraser"></i> 清空查询
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>

            <div class="col-12">
                <div class="card">
                    <div class="card-header">
                        <button class="btn btn-default btn-sm ReloadButton" data-toggle="tooltip" title="刷新列表数据">
                            <i class="fas fa-redo"></i> 刷新
                        </button>
                    </div>
                    <div class="card-body table-responsive p-0">
                        <table class="table table-hover table-bordered dataTable text-nowrap">
                            <thead>
                                <tr>
                                    <th>落地页</th>
                                    <th>国家</th>
                                    <th>pv</th>
                                    <th>uv</th>
                                    <th>点击统计</th>
                                    <th>操作</th>
                                </tr>
                            </thead>

                            <tbody>
                                {foreach name='data' id='item'}
                                <tr>
                                    <td>{$item.page_keys}</td>
                                    <td>{$item.country}</td>
                                    <td>{$item.pv}</td>
                                    <td>usercode:{$item.uv}<br/>ip:{$item.ipuv}</td>
                                    <td>
                                        {if $item.butjson}
                                        {foreach name='$item.butjson' id='btn' empty ='无'}
                                        <a data-id="{$btn.page_log_id}" data-url="click_detail" data-confirm="2" data-type="2"
                                            class="btn btn-default btn-xs AjaxButton" data-title="查看事件" title="查看事件"
                                            data-toggle="tooltip">
                                            {$btn.page_log_id}
                                        </a>:{$btn.c}
                                        {/foreach}
                                        <br />
                                        
                                        {/if}

                                    </td>
                                    <td class="td-do">
                                        <a data-id="{$item.page_keys}"  data-url="detail" data-confirm="2" data-type="2"
                                            class="btn btn-default btn-xs AjaxButton" data-title="日志详情" title="查看详情"
                                            data-toggle="tooltip">
                                            <i class="fas fa-info-circle"></i>
                                            访问日志
                                        </a>
                                    </td>
                                </tr>
                                {/foreach}
                            </tbody>
                        </table>
                    </div>
                    <div class="card-footer clearfix">
                        {$page|raw}
                        {include file='public/change_page' /}
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

{/block}